package com.zh.juc.callback;

/**
 * @Author: zhanghuan
 * @date: 2022/10/9 18:56
 * @description: create it
 */
public class Mother1 {

    private Son1 son;

    public Mother1(Son1 son) {
        this.son = son;
    }

    public void sayBye() {
        System.out.println("回调开始");
        son.ride(new CallListener() {
            @Override
            public void call() {
                System.out.println("我到学校了");
            }
        });
        System.out.println("回调结束");
    }
}
